<div class="card">
  <div class="card-block bg-faded">
    <div class="row">
      <div class="col-md-9">
        <form class="form-inline" ng-submit="$ctrl.search()">
          <div class="form-group">
            <input type="text" name="q" class="form-control" ng-model="$ctrl.q" />
          </div>
          <button type="submit" class="btn btn-outline-info">{{'search'}}</button>
        </form>
      </div>
      <div class="col-md-3">
        <span class="pull-md-right">
          <a href="#" class="btn btn-success" ui-sref="app.new-post">new-post</a>
        </span>
      </div>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-md-6" ng-repeat="post in $ctrl.posts ">
    <div class="card card-block">
      <h4 class="card-title">{{post.title}}</h4>
      <h6 class="card-subtitle text-muted">{{post.createdAt|date:'short'}}</h6>
      <p class="card-text">{{post.content}}</p>
      <div class="text-md-right">
        <a href="# " ui-sref="app.edit-post({id: post.id})">edit</a>
        <a href="# " ui-sref="app.view-post({id: post.id})">view</a>
      </div>
    </div>
  </div>
</div>
